<%@ taglib prefix="paging" uri="paging-taglib" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%--
  Created by IntelliJ IDEA.
  User: LV
  Date: 2016/7/4
  Time: 9:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>全部订单</title>
</head>
<body>
<div class="navigation">
    <div class="crumbs ">
        <i class="tm-iconfont icon-info"></i>
        <a href="#">卖家中心</a><span>&gt;</span><a href="#200">交易管理</a><span>&gt;</span>全部订单
    </div>
    <div class="help">
        <a href="#" target="_blank">卖家交易学习专区</a>
    </div>
</div>
<!--商品列表 star-->
<div class="goods_list p-t10">
<form action="${ctx}/order/searchOrderByConditions" method="post">
    <div class="tip_from p-l50">
        <ul class="tar">
            <li class="p-b10"><label>订单编号：</label><input type="text" class="text w150" name="orderNum"/></li>
            <li class="p-b10"><label>交易时间：</label>
                <input type="text" class="text w150" name="startTime" placeholder="格式：2016/1/1"/>
                <span class="p-lr10 c-999999">-</span>
                <input type="text" class="text w150" name="endTime" placeholder="格式：2016/12/1"/>
            </li>
            <li class="p-b10"><label>买家：</label><input type="text" class="text w150" name="buyer"/></li>
            <li class="p-b10"><label>订单状态：</label>
                <select class="text w172" name="status">
                    <option value="-2">选择状态</option>
                    <option value="-1">关闭的订单</option>
                    <option value="0">待支付的订单</option>
                    <option value="1">已支付订单</option>
                    <option value="2">已发货订单</option>
                    <option value="3">成功的订单</option>

                </select>
            </li>
        </ul>
        <div class="bot p-tb10"><label>&nbsp;</label><button class="i_btn u2 p-lr50">搜索商品</button></div>
    </div>
</form>
    <div class="mtc_tab">
        <!--star mt-->
        <div class="mt">
            <a href="${ctx}/order/getAllOrders" class="curr">全部订单</a>
            <a href="${ctx}/order/getAllOrdersByStatus?status=0">等待买家付款</a>
            <a href="${ctx}/order/getAllOrdersByStatus?status=1">等待发货</a>
            <a href="${ctx}/order/getAllOrdersByStatus?status=2">已发货</a>
            <a href="${ctx}/order/getAllOrdersByStatus?status=3">成功的订单</a>
            <a href="${ctx}/order/getAllOrdersByStatus?status=-1">关闭的订单</a>
        </div>
        <!--end mt-->
        <!--star mc-->
        <div class="mc">
            <div class="u_table_list m-t20">
                <!--star 名称-->
                <div class="mtt line-left line-right line-top">
                    <table>
                        <colgroup>
                            <col width="35%">
                            <col width="10%">
                            <col width="8%">
                            <col width="10%">
                            <col width="13%">
                            <col width="10%">
                            <col width="15%">
                        </colgroup>
                        <tbody>
                        <tr class="fwb">
                            <th>商品</th>
                            <th>单价（元）</th>
                            <th>数量</th>
                            <th>售后</th>
                            <th>买家</th>
                            <th>实收款(元)</th>
                            <th>&nbsp;</th>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <!--end 名称-->
                <c:forEach items="${orderList}" var="list">
                    <!--star 商品-->
                    <div class="table002 line-right line-top m-t20">
                        <table>
                            <colgroup>
                                <col width="35%">
                                <col width="10%">
                                <col width="8%">
                                <col width="10%">
                                <col width="13%">
                                <col width="10%">
                                <col width="15%">
                            </colgroup>
                            <tbody>
                            <tr>
                                <td class="tb_top" colspan="7"><span>订单号:${list.oOrder.orderNum}</span><span class="p-l50 c-FF0000">
                                    <c:if test="${list.oOrder.orderStatus==-1}">订单已关闭</c:if>
                                    <c:if test="${list.oOrder.orderStatus==0}">等待买家付款</c:if>
                                    <c:if test="${list.oOrder.orderStatus==1}">等待发货</c:if>
                                    <c:if test="${list.oOrder.orderStatus==2}">等待收货</c:if>
                                    <c:if test="${list.oOrder.orderStatus==3}">买家已收货</c:if>
                                </span><span class="r">下单时间: <fmt:formatDate value="${list.oOrder.orderTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></span></td>
                            </tr>
                            </tbody>
                            <tbody>
                            <tr>
                                <td>
                                    <div class="product_name">
                                        <div class="t_img"><img src="${list.orderProductsEntityList[0].image}" /></div>
                                        <div class="t_info">

                                            <a href="#">${list.orderProductsEntityList[0].title}</a>
                                            <div>
                                                <span class="c-999999">${list.orderProductsEntityList[0].code}</span>
                                            </div>
                                        </div>
                                    </div>
                                </td>
                                <td class="not_lb">${list.orderProductsEntityList[0].price}</td>
                                <td class="not_lb">${list.orderProductsEntityList[0].quantity}</td>
                                <td class="not_lb"><c:if test="${list.orderProductsEntityList[0].itemStatus==1}">
                                    已申请退货
                                </c:if></td>

                                <td rowspan="${list.orderProductsEntityList.size()}"><span class="c-3b9eeb">${list.oOrder.buyerUserName}</span></td>
                                <td rowspan="${list.orderProductsEntityList.size()}" class="tac">
                                    <div class="fwb">${list.oOrder.paymentMoneyAmount}</div>
                                    <c:if test="${list.oOrder.totalFreightAmount>0}">
                                        <div>(含快递：${list.oOrder.totalFreightAmount})</div>
                                    </c:if>
                                </td>

                                <td rowspan="${list.orderProductsEntityList.size()}" class="tac">
                                    <div>
                                        <c:if test="${list.oOrder.orderStatus==-1}"><a class="c-FF0000" href="#">订单已关闭</a></c:if>
                                        <c:if test="${list.oOrder.orderStatus==0}"><a class="c-FF0000" href="#">等待买家付款</a></c:if>
                                        <c:if test="${list.oOrder.orderStatus==1}">
                                            <a class="c-FF0000" href="#">等待发货</a>
                                            <div><a class="c-3b9eeb" href="${ctx}/order/sendGoods?oid=${list.oOrder.orderId}">发货</a></div>
                                        </c:if>
                                        <c:if test="${list.oOrder.orderStatus==2}"><a class="c-FF0000" href="#">等待买家收货</a></c:if>
                                        <c:if test="${list.oOrder.orderStatus==3}"><a class="c-FF0000" href="#">买家已收货</a></c:if>
                                    </div>
                                        <%--<div><a class="c-3b9eeb" href="#">发货</a></div>--%>
                                    <div><a class="c-3b9eeb" href="${ctx}/order/ordersInfor?oid=${list.oOrder.orderId}">详情</a></div>
                                </td>
                            </tr>

                            <c:forEach items="${list.orderProductsEntityList}" var="items" begin="1">
                                <tr>
                                    <td>
                                        <div class="product_name">
                                            <div class="t_img"><img src="${items.image}" /></div>
                                            <div class="t_info">
                                                <a href="#">${items.title}</a>
                                                <div>
                                                    <span class="c-999999">商品编码：${items.code}</span>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td class="not_lb">${items.price}</td>
                                    <td class="not_lb">${items.quantity}</td>
                                    <td class="not_lb">
                                        <c:if test="${items.itemStatus==1}">
                                            已申请退货
                                        </c:if>
                                    </td>
                                </tr>

                            </c:forEach>
                            </tbody>
                        </table>
                    </div>
                    <!--end 商品-->
                </c:forEach>

            </div>
            <div class="pages" style="padding:20px; text-align:right;">
                <ul>
                    <paging:paging pageIndex="${pageIndex}" totalPage="${totalPage}" href="${ctx}/order/getAllOrders" htmlTag="li" ></paging:paging>
                    <%--<li><a>上一页</a></li>--%>
                    <%--<li><a>1</a></li>--%>
                    <%--<li class="active"><a>2</a></li>--%>
                    <%--<li><a>3</a></li>--%>
                    <%--<li><a>4</a></li>--%>
                    <%--<li>...</li>--%>
                    <%--<li><a>100</a></li>--%>
                    <%--<li><a>下一页</a></li>--%>
                </ul>
                <%--<form>--%>
                <%--共100页到第--%>
                <%--<input type="text" value="1" class="inputwh">--%>
                <%--页--%>
                <%--</form>--%>
            </div>
        </div>
        <!--end mc-->
    </div>
</div>
<!--商品列表 end -->
</body>
</html>
